package com.runvp.service.biz.service.impl;

import com.runvp.common.core.text.Convert;
import com.runvp.common.utils.DateUtils;
import com.runvp.service.biz.domain.BizOrderRealTimeData;
import com.runvp.service.biz.mapper.BizOrderRealTimeDataMapper;
import com.runvp.service.biz.service.IBizOrderRealTimeDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 订单充电实时数据Service业务层处理
 * 
 * @author runvp
 * @date 2024-07-15
 */
@Service
public class BizOrderRealTimeDataServiceImpl implements IBizOrderRealTimeDataService {
    @Autowired
    private BizOrderRealTimeDataMapper bizOrderRealTimeDataMapper;

    /**
     * 查询订单充电实时数据
     * 
     * @param id 订单充电实时数据主键
     * @return 订单充电实时数据
     */
    @Override
    public BizOrderRealTimeData selectBizOrderRealTimeDataById(Long id) {
        return bizOrderRealTimeDataMapper.selectBizOrderRealTimeDataById(id);
    }

    /**
     * 查询订单充电实时数据列表
     * 
     * @param bizOrderRealTimeData 订单充电实时数据
     * @return 订单充电实时数据
     */
    @Override
    public List<BizOrderRealTimeData> selectBizOrderRealTimeDataList(BizOrderRealTimeData bizOrderRealTimeData) {
        return bizOrderRealTimeDataMapper.selectBizOrderRealTimeDataList(bizOrderRealTimeData);
    }

    /**
     * 新增订单充电实时数据
     * 
     * @param bizOrderRealTimeData 订单充电实时数据
     * @return 结果
     */
    @Override
    public int insertBizOrderRealTimeData(BizOrderRealTimeData bizOrderRealTimeData) {
        bizOrderRealTimeData.setCreateTime(DateUtils.getNowDate());
        return bizOrderRealTimeDataMapper.insertBizOrderRealTimeData(bizOrderRealTimeData);
    }

    /**
     * 修改订单充电实时数据
     * 
     * @param bizOrderRealTimeData 订单充电实时数据
     * @return 结果
     */
    @Override
    public int updateBizOrderRealTimeData(BizOrderRealTimeData bizOrderRealTimeData) {
        return bizOrderRealTimeDataMapper.updateBizOrderRealTimeData(bizOrderRealTimeData);
    }

    /**
     * 批量删除订单充电实时数据
     * 
     * @param ids 需要删除的订单充电实时数据主键
     * @return 结果
     */
    @Override
    public int deleteBizOrderRealTimeDataByIds(String ids) {
        return bizOrderRealTimeDataMapper.deleteBizOrderRealTimeDataByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除订单充电实时数据信息
     * 
     * @param id 订单充电实时数据主键
     * @return 结果
     */
    @Override
    public int deleteBizOrderRealTimeDataById(Long id) {
        return bizOrderRealTimeDataMapper.deleteBizOrderRealTimeDataById(id);
    }
}
